﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
// Copyright (C) 2017 ZyCoder
// 版权所有。 
//
// 文件名：MainTopViewModel
// 
// 创建者：名字 (zycoder)
// 时间：2018/4/9 22:30:23
//
// 版本：V1.0.0
// 网站: http://www.cnblogs.com/zycoder
//----------------------------------------------------------------*/
#endregion

using Prism.Commands;
using Prism.Events;
using Prism.Mvvm;
using TuTu.Common.Events;

namespace TuTu.WpfApp.ViewModels
{
    public class MainTopViewModel: BindableBase
    {
        private IEventAggregator _ea;
        public string Tip { get; set; } = "TuTu";

        public DelegateCommand<string> WindowActionCommond { get; set; }

        public DelegateCommand DragCommand { get; set; }

        public MainTopViewModel(IEventAggregator ea)
        {
            _ea = ea;
            this.WindowActionCommond = new DelegateCommand<string>(WindowActionExcute);
            this.DragCommand = new DelegateCommand(DragExcute);
        }

        public void DragExcute()
        {
            _ea.GetEvent<WindowActionEvent>().Publish("DragMove");
        }
        public void WindowActionExcute(string str)
        {
            _ea.GetEvent<WindowActionEvent>().Publish(str);
        }
    }
}
